﻿@model ProductDetailsModel.ProductBreadcrumbModel
@using Nop.Web.Models.Catalog;
@{
    //current store ID
    int currentStoreId = Nop.Core.Domain.Stores.Store.AllStoreReservedId;
    if (Url.RequestContext.RouteData.Values.ContainsKey("storeId"))
    {
        currentStoreId = Convert.ToInt32(Url.RequestContext.RouteData.Values["storeId"].ToString());
    }
}
    <ul class="breadcrumb product-breadcrumb">
        @Html.Widget("productbreadcrumb_before")
        <li>
            <a href="@Url.RouteUrl("HomePage")" title="Home">Home</a>
            <span class="delimiter"></span>
        </li>
        @for (int i = 0; i < Model.CategoryBreadcrumb.Count; i++)
        {
            var catBr = Model.CategoryBreadcrumb[i];
            <li>
                @*@if (currentStoreId > 1)
                    {
                        <a href="@Url.RouteUrl("PerStoreCategory", new { SeName = catBr.SeName, categoryId = catBr.Id, storeId = currentStoreId })" title="@catBr.Name">@catBr.Name</a>
                    }
                    else
                    {
                        <a href="@Url.RouteUrl("Category", new { SeName = catBr.SeName })" title="@catBr.Name">@catBr.Name</a>
                    }*@
                <a href="@Url.RouteUrl("Category", new { SeName = catBr.SeName })" title="@catBr.Name">@catBr.Name</a>
                <span class="delimiter"></span>
            </li>
        }
        @*uncomment to disable clickable link
            <strong>@Model.ProductName</strong>*@
        <li>
            <strong><a href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">@Model.ProductName</a></strong>
            @Html.Widget("productbreadcrumb_after")
        </li>
    </ul>
